#ifndef __UGEN_CONFIG_H__
#define __UGEN_CONFIG_H__
#include "ugen_feature.h"
#ifdef __BUSINESS_CODE_SUPPORT__
#include "ugen_business.h"

/*
get_ugen_config_value() MCU上报指令解析上报
ugen_analysis_cloude_cmd() Cloud下发指令解析下发
*/

/* 属性 */
#define POWERSTATE "powerstate"                   //开关
#define FILTERRESETONE "filterResetOne"           //滤芯复位1
#define FILTERRESETTWO "filterResetTwo"           //滤芯复位2
#define RAWWATERTDS "rawwaterTDS"                 //原水水质
#define tds "TDS"                                 //总溶解固体值
#define WATERPRODUCINGSTATE "waterProducingState" //制水状态
#define WATERCHANGESTATE "waterChangeState"       //换水状态
#define DIYTARGETWATERTIELD "DIYTargetWaterYield" //取水水量
#define CHILDLOCKONOFF "childLockOnOff"           //童锁开关
#define WASHINGSWITCH "washingSwitch"             //冲洗功能
#define FILTERLIFETIMEONE "filterLifetimeOne"     //滤芯寿命_1
#define FILTERLIFETIMETWO "filterLifetimeTwo"     //滤芯寿命_2
#define WATEROUTTEMPERATURE "waterOutTemperature" //出水水温
#define PUREFITYWATER "purefityWater"             //净水总量
#define GETWATERSWITCH "getwaterSwitch"           //取水开关
#define LOCALRECIPE "localRecipe"                 //本地食谱
#define ERRORCODE "errorCode"                     //错误码
/* 事件 */
#define FAULTREPORTEVENT "faultReportEvent"           //故障上报事件
#define FILTEREXPIRED "filterExpired"                 //滤芯寿命到期
#define WATERLEVELTOOLOWEVENT "waterLevelTooLowEvent" //水位过低事件

typedef enum
{
    /* 属性 */
    powerstate = 0x0001,
    filterResetOne,
    filterResetTwo,
    rawwaterTDS,
    TDS,
    waterProducingState,
    waterChangeState,
    DIYTargetWaterYield,
    childLockOnOff,
    washingSwitch,
    filterLifetimeOne,
    filterLifetimeTwo,
    waterOutTemperature,
    purefityWater,
    getwaterSwitch,
    localRecipe = 0x0014,
    /* 事件 */
    Errorcode = 0x0010,
    faultReportEvent,
    filterExpired,
    waterLevelTooLowEvent,
} mcu_up_cmd_action;

/* 数据类型:
TYPE_INT代表需要传递的值为负值,
TYPE_UINT代表传递的为正值,
TYPE_BOOL传递的为bool值,
double和float看做INT和UINT
*/
const ugen_config currency_config[] = {
    /* 事件 */
    {FAULTREPORTEVENT, faultReportEvent, TYPE_EVENT},
    {FILTEREXPIRED, filterExpired, TYPE_EVENT},
    {WATERLEVELTOOLOWEVENT, waterLevelTooLowEvent, TYPE_EVENT},
    /* 属性 */
    {POWERSTATE, powerstate, TYPE_BOOL},
    {FILTERRESETONE, filterResetOne, TYPE_BOOL},
    {FILTERRESETTWO, filterResetTwo, TYPE_BOOL},
    {RAWWATERTDS, rawwaterTDS, TYPE_UINT16_T},
    {tds, TDS, TYPE_UINT16_T},
    {WATERPRODUCINGSTATE, waterProducingState, TYPE_BOOL},
    {WATERCHANGESTATE, waterChangeState, TYPE_BOOL},
    {DIYTARGETWATERTIELD, DIYTargetWaterYield, TYPE_UINT16_T},
    {CHILDLOCKONOFF, childLockOnOff, TYPE_BOOL},
    {WASHINGSWITCH, washingSwitch, TYPE_BOOL},
    {FILTERLIFETIMEONE, filterLifetimeOne, TYPE_UINT16_T},
    {FILTERLIFETIMETWO, filterLifetimeTwo, TYPE_UINT16_T},
    {WATEROUTTEMPERATURE, waterOutTemperature, TYPE_UINT16_T},
    {PUREFITYWATER, purefityWater, TYPE_UINT16_T},
    {GETWATERSWITCH, getwaterSwitch, TYPE_BOOL},
    {LOCALRECIPE, localRecipe, TYPE_UINT16_T},
    {ERRORCODE, Errorcode, TYPE_UINT16_T},

    {NULL, NULL, NULL}};

#endif //__BUSINESS_CODE_SUPPORT__
#endif //__UGEN_CONFIG_H__